﻿// <copyright file="Light.cs" company="Axelerate Solutions S.A.">
// Copyright (c) Axelerate Solutions S.A.  All rights reserved.
// </copyright>

namespace Axelerate.Silverlight3D.Media.Media3D
{
    using System;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Ink;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;

    /// <summary>
    /// File name: Light.cs
    /// Company: Axelerate Solutions S.A.
    /// Created By: Daniel Rojas
    /// Created Date: 10/10/2008 11:47:00 h.
    /// Description: Model3D object that represents lighting applied to a 3-D scene.
    ///   <Modifications>
    ///   </Modifications>
    /// </summary>
    public abstract class Light : Model3D
    {
        #region Fields
        
        /// <summary>
        /// Identifies the Color dependency property.
        /// </summary>
        public static readonly DependencyProperty ColorProperty =
                    DependencyProperty.Register(
                          "Color",
                          typeof(Color),
                          typeof(Light),
                          new PropertyMetadata(OnColorPropertyChanged));
        #endregion

        #region Properties
        
        /// <summary>
        /// Gets or sets the color of the light.
        /// </summary>
        public Color Color
        {
            get
            {
                return (Color)this.GetValue(ColorProperty);
            }
            set
            {
                this.SetValue(ColorProperty, value);
            }
        }
        #endregion

        #region Methods
        /// <summary>
        /// Raise the Color changed event
        /// </summary>
        /// <param name="d">DependencyObject owner of the property</param>
        /// <param name="e">DependencyPropertyChangedEventArgs with the necesary information</param>
        private static void OnColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ((Light)d).NotifyPropertyChanged("Color");
        }

        internal override void CreateRenderEntities(RenderEntityPool entityPool)
        {

        }

        internal abstract Point3D GetColorIntencityByNormal(Vector3D Normal);
        #endregion
    }
}
